package ma.fizazi.missionsmanagement.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;


@Entity
@Table(name = "CLIENTS")
public class Client implements Serializable {

	private static final long serialVersionUID = 1L;


	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private int id;


	@Column
	private String adresse;
	@Column
	private String description;
	@Column
	private String formeJuridique;
	@Column
	private String nomClient;
	@Column
	private String registreCommercial;

	@OneToMany(mappedBy = "client", cascade = CascadeType.ALL)
	private List<Activite> activites;
	
	@OneToMany(mappedBy = "client", cascade = CascadeType.ALL)
	private List<Contact> contacts;
	
	@ManyToOne
	private GroupeClient groupeClient;
	
	public Client(){

	}

	
	public void finalize()
	  throws Throwable{

	}


	public String getAdresse() {
		return adresse;
	}


	public void setAdresse(String adresse) {
		this.adresse = adresse;
	}


	public String getDescription() {
		return description;
	}


	public void setDescription(String description) {
		this.description = description;
	}


	public String getFormeJuridique() {
		return formeJuridique;
	}


	public void setFormeJuridique(String formeJuridique) {
		this.formeJuridique = formeJuridique;
	}


	public String getNomClient() {
		return nomClient;
	}


	public void setNomClient(String nomClient) {
		this.nomClient = nomClient;
	}


	public String getRegistreCommercial() {
		return registreCommercial;
	}


	public void setRegistreCommercial(String registreCommercial) {
		this.registreCommercial = registreCommercial;
	}


	public List<Activite> getActivites() {
		return activites;
	}


	public void setActivites(List<Activite> activites) {
		this.activites = activites;
	}


	public List<Contact> getContacts() {
		return contacts;
	}


	public void setContacts(List<Contact> contacts) {
		this.contacts = contacts;
	}


	public GroupeClient getGroupeClient() {
		return groupeClient;
	}


	public void setGroupeClient(GroupeClient groupeClient) {
		this.groupeClient = groupeClient;
	}


	public int getId() {
		return id;
	}


	public void setId(int id) {
		this.id = id;
	}

	
	
}